import request from '@/utils/request'

export async function getProjectDevelopListApi(params) {
  var resp = await request({
    url: '/project/projectdevelop/',
    method: 'get',
    params
  })
  return resp;
}

export async function createProjectDevelopApi(data) {
  var resp = await request({
    url: '/project/projectdevelop/',
    method: 'post',
    data
  })
  return resp
}

export async function updateProjectDevelopApi(id, data) {
  var resp = await request({
    url: '/project/projectdevelop/' + id + '/',
    method: 'put',
    data
  })
  return resp
}

export async function deleteProjectDevelopApi(id) {
  var resp = await request({
    url: '/project/projectdevelop/' + id + '/',
    method: 'delete'
  })
  return resp
}
export async function BatchdeleteDevelopProjectApi(data) {
  var resp = await request({
    url: `/project/projectdevelop/${data}/batchDelete/`,
    method: 'delete',
    data
  })
  return resp
}
// 获取初始数据
export async function getProjectDevelopInitDataApi(params) {
  var resp = await request({
    url: '/project/get_develop_inidata/',
    method: 'get',
    params
  })
  return resp;
}

export async function releaseDevelopProjectBaseApi(id) {
  var resp = await request({
    url: '/project/projectdevelop/' + id + '/release/',
    method: 'put'
  })
  return resp
}

export async function closeDevelopProjectBaseApi(id) {
  var resp = await request({
    url: '/project/projectdevelop/' + id + '/close/',
    method: 'put'
  })
  return resp
}
// 开发项目核算履历
export async function getProjectDevelopAccountApi(params) {
  var resp = await request({
    url: '/project/projectdevelopaccount/',
    method: 'get',
    params
  })
  return resp;
}
// 开发项目阶段别预实管理
export async function getProjectDevelopStageApi(params) {
  var resp = await request({
    url: '/project/projectdevelopstage/',
    method: 'get',
    params
  })
  return resp;
}
// 开发项目拆分订单

export async function splitProjectDevelopApi(id, data) {
  var resp = await request({
    url: '/project/projectdevelop/' + id + '/SplitUpdate/',
    method: 'put',
    data
  })
  return resp
}
